<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  <title>新增频道</title>
  <link rel="stylesheet" href="../static/css/bootstrap.min.css">
  <link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
  <link href="css/base.css" rel="stylesheet" type="text/css" />
  <script language="javascript" src="../static/js/jquery.js"></script>
  <script src="../static/js/bootstrap.bundle.js"></script>
  <script language="javascript" src="js/main.js"></script>
  <script language="javascript" src="js/diy.js"></script>
  <script language="javascript">
    function checkSubmit() {
      if (document.form1.name.value == '') {
        ShowMsg("自定义表单名称不能为空！");
        return false;
      }
      return true;
    }
  </script>
  <style type="text/css">
    .STYLE1 {
      color: #FF0000
    }

    td {
      padding: 2px;
      padding-left: 6px;
      line-height: 150%;
    }

    .STYLE2 {
      color: #666666;
      display: none;
    }
  </style>
</head>

<body background='images/allbg.gif' leftmargin='8' topmargin='8'>
  <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="table maintable table-bordered mt-3"
    style="background:#CFCFCF;">
    <form name="form1" action="diy_add.php?action=add" method="post" onSubmit="return checkSubmit();">
      <tr bgcolor="#CFCFCF">
        <td height="28" colspan="2" bgcolor="#EDF9D5" background='images/tbg.gif'>
          <b>&nbsp;<a href="diy_main.php"><u>自定义表单管理</u></a> &gt; 新增自定义表单：</b>
        </td>
      </tr>
      <tr>
        <td width="160" height="28" align="left" bgcolor="#FFFFFF">
          diyid：<br />
          <span class="STYLE2" id='help1'>数字，创建后不可更改，并具有唯一性。推荐使用默认值</span>
        </td>
        <td bgcolor="#FFFFFF">
          <input name="diyid" type="text" id="diyid" size="10" value="<?php echo $newdiyid?>" class='pubinputs'
            style='width:60px' />
          * <img src="images/help.gif" alt="帮助" width="16" height="16" border="0" style="cursor:hand"
            onClick="showHide2('help1')" />
        </td>
      </tr>
      <tr>
        <td height="28" align="left" bgcolor="#FFFFFF">
          自定义表单名称：<br />
          <span class="STYLE2" id="help3">自定义表单的中文名称，在后台管理，前台发布等均使用此名字。</span>
        </td>
        <td bgcolor="#FFFFFF">
          <input name="name" type="text" id="name" style="width:180px" value="自定义表单<?php echo $newdiyid;?>"
            class='pubinputs' />
          *<img src="images/help.gif" alt="帮助" width="16" height="16" border="0" style="cursor:hand"
            onClick="showHide2('help3')" />
        </td>
      </tr>
      <tr>
        <td height="28" align="left" bgcolor="#FFFFFF">数据表：<br />
          <span class="STYLE2" id="help5">必须由英文、数字、下划线组成，用于保存自定义表单数据，不能和已有表名重复，创建后不可修改表名。</span></td>
        <td bgcolor="#FFFFFF">
          <input name="table" type="text" id="table" style="width:180px"
            value="<?php echo $cfg_dbprefix; ?>diyform<?php echo $newdiyid; ?>" class='pubinputs' />
          *<img src="images/help.gif" alt="帮助" width="16" height="16" border="0" style="cursor:hand"
            onClick="showHide2('help5')" />
        </td>
      </tr>
      <tr>
        <td height="28" align="left" bgcolor="#FFFFFF">字段配置：</td>
        <td bgcolor="#FFFFFF"><span class="STYLE1">建立自定义表单后在“更改”自定义表单的地方添加字段即可。</span></td>
      </tr>
      <tr>
        <td height="28" align="left" bgcolor="#FFFFFF">列表模板：</td>
        <td bgcolor="#FFFFFF"><input name="listtemplate" type="text" id="listtemplate" style="width:180px"
            value="list_diyform<?php echo $newdiyid;?>.htm" class='pubinputs' /></td>
      </tr>
      <tr>
        <td height="28" align="left" bgcolor="#FFFFFF">内容模板：</td>
        <td bgcolor="#FFFFFF"><input name="viewtemplate" type="text" id="viewtemplate" style="width:180px"
            value="view_diyform<?php echo $newdiyid;?>.htm" class='pubinputs' /></td>
      </tr>
      <tr>
        <td height="28" align="left" bgcolor="#FFFFFF">发布模板：</td>
        <td bgcolor="#FFFFFF"><input name="posttemplate" type="text" id="posttemplate" style="width:180px"
            value="post_diyform<?php echo $newdiyid;?>.htm" class='pubinputs' /></td>
      </tr>
      <tr>
        <td height="28" align="left" bgcolor="#FFFFFF">前台列表和内容页公开？：</td>
        <td bgcolor="#FFFFFF">
          <label><input name="public" type="radio" value="2" class='np' /> 完全公开</label>
          <label><input name="public" type="radio" value="1" class='np' checked='1' /> 公开审核过的</label>
          <label><input name="public" type="radio" value="0" class='np' /> 不公开</label>
        </td>
      </tr>
      <tr bgcolor="#F9FCEF">
        <td height="28" colspan="2">
          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-borderless">
            <tr>
              <td width="26%" height="45">&nbsp;</td>
              <td width="15%">
                <button type="submit" name="button" id="button" class='btn btn-secondary'>确定</button>
              </td>
              <td width="59%">
                <button type="button" class='btn btn-secondary' id="button2" onclick="location='diy_main.php';"
                >返回</button>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </form>
  </table>
</body>

</html>